﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using FastColoredTextBoxNS;
namespace VASMide
{
    public partial class options : Form
    {
        public options()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        { 
            colorDialog1.SolidColorOnly = true;
            colorDialog1.ShowDialog();
            SolidBrush s = new SolidBrush(colorDialog1.Color);


            Form1.c.keywordStyle = new TextStyle(s, null, FontStyle.Bold);
            VASMide.Properties.Settings.Default.keyWord = colorDialog1.Color;
            keyColor.ForeColor = colorDialog1.Color;
            VASMide.Properties.Settings.Default.Save();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            colorDialog1.SolidColorOnly = true;
            colorDialog1.ShowDialog();
            SolidBrush s = new SolidBrush(colorDialog1.Color);


            Form1.c.stringStyle = new TextStyle(s, null, FontStyle.Bold);
            VASMide.Properties.Settings.Default.stringColor = colorDialog1.Color;
            stringColor.ForeColor = colorDialog1.Color;
            VASMide.Properties.Settings.Default.Save();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            colorDialog1.SolidColorOnly = true;
            colorDialog1.ShowDialog();
            SolidBrush s = new SolidBrush(colorDialog1.Color);


            Form1.c.commentStyle = new TextStyle(s, null, FontStyle.Bold);
            VASMide.Properties.Settings.Default.comment = colorDialog1.Color;
            label2.ForeColor = colorDialog1.Color;
            VASMide.Properties.Settings.Default.Save();
        }

        private void options_Load(object sender, EventArgs e)
        {
            label2.ForeColor = VASMide.Properties.Settings.Default.comment;
            keyColor.ForeColor = VASMide.Properties.Settings.Default.keyWord;
            stringColor.ForeColor = VASMide.Properties.Settings.Default.stringColor;
        }
    }
}
